//
//  JSDSportType.h
//  仿咕咚
//
//  Created by Abner on 16/11/8.
//  Copyright © 2016年 Abner. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <MAMapKit/MAMapKit.h>
typedef enum : NSUInteger{
    JSDSportTypeRun,
    JSDSportTypeWalk,
    JSDSportTypeRiding
}JSDSportType;
//运动状态类型枚举
typedef enum : NSUInteger{
    JSDSportStatePause = 2000,
    JSDSportStateContinue,
    JSDSportStateEnd
}JSDSportState;
@interface JSDSportTracking : NSObject

//给定初始化方法
- (instancetype)initWithType:(JSDSportType)type states:(JSDSportState)state;
//运动类型属性
@property(nonatomic,assign,readonly) JSDSportType sportType;
//运动状态
@property(nonatomic,assign) JSDSportState sportState;
//运动图片名称
@property(nonatomic,strong,readonly) NSString *imageStr;
/**
 平均速度
 */
@property (nonatomic, readonly) double avgSpeed;
/**
 最大速度
 */
@property (nonatomic, readonly) double maxSpeed;
/**
 总时长
 */
@property (nonatomic, readonly) double totalTime;
/**
 总距离
 */
@property (nonatomic, readonly) double totalDistance;

//追加用户位置，返回折线图形
- (MAPolyline *)appendLocation:(CLLocation *)location;
@end
